
#define IPV6_ADDR_ANY		0x0000U
#define IPV6_ADDR_LOOPBACK	0x0010U
#define IPV6_ADDR_LINKLOCAL	0x0020U

#define HAVE_AFINET 1
#define HAVE_AFINET6 1

struct interface {
    struct interface *next, *prev;

    char name[IFNAMSIZ];	/* interface name        */
    short type;			/* if type               */
    short flags;		/* various flags         */
    struct sockaddr addr;	/* IP address            */
    int has_ip;
    //char hwaddr[32];		/* HW address            */
};

extern int if_fetch(struct interface *ife);

int for_all_interfaces(int (*)(struct interface *));
extern struct aftype *get_afntype(int af);
extern int do_if_fetch(struct interface *ife);

int do_if_print(struct interface *ife);
extern void ife_print(struct interface *ptr);


